/*
 * @Author: wuhao930406 1148547900@qq.com
 * @Date: 2023-06-12 11:05:44
 * @LastEditors: wuhao930406 1148547900@qq.com
 * @LastEditTime: 2023-07-13 14:42:37
 * @FilePath: /legion-iot/config/config.js
 * @Description: 
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 */
import { defineConfig } from "umi";
import env from "./env";
import routes from './routes';
import proxy from './proxy';

const { REACT_APP_ENV = "dev",NODE_ENV } = process.env;
export default defineConfig({
  npmClient: "yarn",
  plugins: [
    "@umijs/plugins/dist/antd",
    "@umijs/plugins/dist/locale",
    "@umijs/plugins/dist/layout",
    "@umijs/plugins/dist/initial-state",
    "@umijs/plugins/dist/model",
    "@umijs/plugins/dist/access",
  ],
  antd: {
    
  },
  model: {},
  access: {},
  initialState: {},
  define: env[REACT_APP_ENV],
  routes,
  hash: true,
  history: {
    type: 'hash',
  },
  manifest: {
    basePath: '/',
  },
  proxy: proxy[REACT_APP_ENV || 'dev'],
  publicPath:NODE_ENV!=="development"?"./":"/",
  esbuildMinifyIIFE:true
});
